﻿using ServerSide.Model.Other;
using ServerSide.Model;
using ServerSide.Model.Dto.UserDto;
using ServerSide.Model.Dto.RoleDto;
using System.Data;

namespace ServerSide.Service.Interface
{
    /// <summary>
    /// 权限管理页面接口
    /// </summary>
    public interface IRoleService
    {
        /// <summary>
        /// 查询、获取所有角色表数据
        /// </summary>
        /// <param name="roleRequest"></param>
        /// <returns></returns>
        PageInfo GetRole(RoleRequest roleRequest);
        /// <summary>
        /// 新增、编辑用户时获取所有的角色信息
        /// </summary>
        /// <returns></returns>
        List<Role> GetRoleList();
        /// <summary>
        /// 编辑用户时需要回显当前用户拥有的角色id信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<int> GetRoleListByUId(int? userId);

        bool AddRole(Role role);

        bool DelRole(Role role);
        bool BatchDelRoles(List<int> ids);

        bool UpdateRole(Role role);

        bool UpdateRoleEnable(int id, int enable);
        /// <summary>
        /// 编辑菜单权限时需要获取当前用户拥有的菜单id信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<int> GetMenuIdByRoleId(int id);
        /// <summary>
        /// 角色更新拥有的菜单权限-RoleMenu表
        /// </summary>
        /// <param name="roleMenuRequest"></param>
        /// <returns></returns>
        bool UpdataRoleMenuScope(RoleMenuRequest roleMenuRequest);
    }
}
